home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / CTRLBA.PAK / MAINFRM.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  97 lines

  1. // mainfrm.h : interface of the CMainFrame class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #ifndef __AFXEXT_H__
  14. #include <afxext.h>         // for access to CToolBar and CStatusBar
  15. #endif
  16.  
  17. #include "palette.h"        // for access to CPaletteBar
  18.  
  19.  
  20. // Instead of using a class here we could have just put these controls
  21. // directly into CMainFrame.  As it is they are sending messages to the
  22. // main frame just like they were part of it instead of part of a control
  23. // bar.
  24. class CStyleBar : public CToolBar
  25. {
  26. public:
  27.     CComboBox   m_comboBox;
  28.     CFont       m_font;
  29. };
  30.  
  31. class CMainFrame : public CFrameWnd
  32. {
  33. // Constructor
  34. public:
  35.     CMainFrame();
  36.  
  37. // Attributes
  38. public:
  39.     BOOL m_bInsert;     // TRUE => insert mode, FALSE => overstrike mode
  40.  
  41. // Operations
  42. public:
  43.  
  44. // Implementation
  45. public:
  46.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  47.     virtual ~CMainFrame();
  48. #ifdef _DEBUG
  49.     virtual void AssertValid() const;
  50.     virtual void Dump(CDumpContext& dc) const;
  51. #endif
  52.  
  53.     BOOL CreateStyleBar();
  54.     BOOL CreateToolBar();
  55.     BOOL CreatePaletteBar();
  56.     BOOL CreateStatusBar();
  57.  
  58. protected:  // control bar embedded members
  59.     CStatusBar  m_wndStatusBar;
  60.     CToolBar    m_wndToolBar;
  61.     CStyleBar   m_wndStyleBar;
  62.     CPaletteBar m_wndPaletteBar;
  63.     CDialogBar  m_wndDlgBar;
  64.     UINT        m_nPaletteCol;
  65.     BOOL        m_bDialogTop;
  66.  
  67. // Generated message map functions
  68. protected:
  69.     //{{AFX_MSG(CMainFrame)
  70.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  71.     afx_msg void OnViewDlgbarTop();
  72.     afx_msg void OnUpdateViewDlgbartop(CCmdUI* pCmdUI);
  73.     afx_msg BOOL OnViewBar(UINT nID);
  74.     afx_msg void OnUpdateBarMenu(CCmdUI* pCmdUI);
  75.     afx_msg void OnViewShort();
  76.     afx_msg void OnViewLong();
  77.     afx_msg void OnUpdateInsert(CCmdUI* pCmdUI);
  78.     afx_msg void OnToggleInsert();
  79.     afx_msg void OnViewPalette();
  80.     afx_msg void OnUpdatePaletteMenu(CCmdUI* pCmdUI);
  81.     afx_msg void OnSelChangePalette();
  82.     afx_msg void OnPalette2column();
  83.     afx_msg void OnPalette3column();
  84.     afx_msg void OnUpdatePalette3column(CCmdUI* pCmdUI);
  85.     afx_msg void OnUpdatePalette2column(CCmdUI* pCmdUI);
  86.     //}}AFX_MSG
  87.  
  88.     afx_msg void OnUpdateStyle(CCmdUI* pCmdUI);
  89.     afx_msg void OnChangeStyle(UINT nID);
  90.     afx_msg void OnPalette(UINT nID);
  91.     afx_msg void OnUpdatePalette(CCmdUI* pCmdUI);
  92.  
  93.     DECLARE_MESSAGE_MAP()
  94. };
  95.  
  96. /////////////////////////////////////////////////////////////////////////////
  97.